// 粒子效果初始化
export function initParticles(containerId) {
  // 简单的粒子效果实现
  const container = document.getElementById(containerId);
  if (!container) return;

  // 创建粒子
  for (let i = 0; i < 50; i++) {
    const particle = document.createElement('div');
    particle.className = 'particle';
    particle.style.cssText = `
      position: absolute;
      width: 4px;
      height: 4px;
      background: ${['#ff6b9d', '#4ecdc4', '#45b7d1', '#96ceb4', '#feca57'][Math.floor(Math.random() * 5)]};
      border-radius: 50%;
      left: ${Math.random() * 100}%;
      top: ${Math.random() * 100}%;
      animation: float ${Math.random() * 3 + 2}s ease-in-out infinite;
      animation-delay: ${Math.random() * 2}s;
      opacity: 0.6;
      pointer-events: none;
    `;
    container.appendChild(particle);
  }
}

// 添加浮动动画样式
const style = document.createElement('style');
style.textContent = `
  @keyframes float {
    0%, 100% { 
      transform: translateY(0px) translateX(0px); 
      opacity: 0.6;
    }
    50% { 
      transform: translateY(-20px) translateX(10px); 
      opacity: 1;
    }
  }
`;
document.head.appendChild(style);
